package com.hwadee.hello.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hwadee.hello.dao.StudentDao2;
import com.hwadee.hello.entity.Student;


public class SearchServlet extends HttpServlet {
       
	StudentDao2 dao = new StudentDao2();
	
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//通过ID搜索学生
		String id = req.getParameter("search");
		resp.sendRedirect("/hello/student?id="+ id);
	}

}
